package com.bdqn.controller;


import com.bdqn.dao.EncollMapper;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

@Controller //控制器
public class EncollController {

    @Resource
    EncollMapper encoll ;

    @ResponseBody
    @RequestMapping("/insertUser")
    public String yesUser(HttpServletResponse response, String username, String pwd){
        response.setHeader("Access-Control-Allow-Origin","*");
        String en = Integer.toString(encoll.insertUser(username,pwd));
        return en;

    }
}
